package com.yz.design.concurrents;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Objects;

/**
 * 笔实体
 */
@Getter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public
class PenBean {

    /**
     * 类型
     */
    private String type;

    /**
     * 颜色
     */
    private String color;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PenBean penBean = (PenBean) o;
        return Objects.equals(type, penBean.type) &&
                Objects.equals(color, penBean.color);
    }

    @Override
    public int hashCode() {
        return Objects.hash(type, color);
    }
}